package handlers

import (
	"agentdesign/service"
)

type Handler struct {
	service *service.ApiService
	prompt  *service.PromptService
}

// common response struct
type Result[T any] struct {
	Code int    `json:"code"`
	Data T      `json:"data"`
	Msg  string `json:"msg"`
}

type ResponseMessages struct {
	SUCCESS           string
	ERROR             string
	INVALID_PARAMS    string
	PROJECT_NOT_FOUND string
	// ... other fields
}

var ResponseMessage = ResponseMessages{
	SUCCESS:           "调用成功",
	ERROR:             "调用失败",
	INVALID_PARAMS:    "请求参数错误",
	PROJECT_NOT_FOUND: "项目不存在",
	// ... other values
}

// SetHandler sets the handler dependencies.
func SetHandler(service *service.ApiService, prompt *service.PromptService) *Handler {
	return &Handler{
		service: service,
		prompt:  prompt,
	}
}
